<?php
date_default_timezone_set('Asia/Shanghai');
require_once 'log/Logger.php';
$id = $_POST["id"];



$conn = mysql_connect('ltfll.gicp.net','qqxj','qqxj');
if(!$conn)
{
    Logger::getLogger()->debug('connect fail!'.mysql_error());
    echo "connect fail!".mysql_error()."\n";
}
mysql_select_db('botlog',$conn);
mysql_query("SET NAMES 'GBK'");
$day = date("Ymd");

$sql = "select rolename from {$day}_botlog where id={$id}";
$rs = mysql_query($sql, $conn);

if($rs)
{
    $ar = mysql_fetch_array($rs);
    print_r($ar);
}
else
{
    Logger::getLogger()->debug('insert fail!'.mysql_error()."\n");
    Logger::getLogger()->debug($sql."\n");
    echo "insert fail!".mysql_error()."\n";
}

mysql_close($conn);